/*
 * AssessmentCriteriaFacade.java
 *
 * Created on 04 May 2008, 22:08
 */

package unilearn.facade;

import java.sql.SQLException;
import java.util.Vector;
import javax.naming.NamingException;
import unilearn.da.DAAssessmentCriteria;

import unilearn.domain.AssessmentCriteria;

/**
 * @author Yin Zhang, 5393558
 * @version 0.1, 03 May 2008, initial creation
 * @version 0.2, 05 May 2008, add NumberIsNotBiggerThanZeroException
 * @version 0.3, 07 May 2008, add NamingException
 * @version 0.4, 07 May 2008, delete NumberIsNotBiggerThanZeroException
 */

public class AssessmentCriteriaFacade
{
	public static AssessmentCriteria getCriteriaByID(long criteriaID) throws SQLException, NamingException
	{
		return DAAssessmentCriteria.getCriteriaByID(criteriaID);
	}

	public static Vector<AssessmentCriteria> getByAssignmentID(long assignmentID)
		throws SQLException, NamingException
	{
		return DAAssessmentCriteria.getCriteriaByAssignment(assignmentID);
	}

	public static void createNewAssessmentCriteria(AssessmentCriteria criteria)
		throws SQLException, NamingException
	{
		DAAssessmentCriteria.insertAssessmentCriteria(criteria);
	}

	public static void updateOldAssessmentCriteria(long criteriaID, AssessmentCriteria criteria)
		throws SQLException, NamingException
	{
		DAAssessmentCriteria.updateCriteria(criteriaID, criteria);
	}
}
